package neu.soft.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author 李博
 * 应付单实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PayableOrder {

  //因为64位，返回给前端时转换为字符串，防止接收存在误差
  @JsonSerialize(using = ToStringSerializer.class)
  private Long payableOrderId;

  private BigDecimal payableCost;

  private Integer financialOrderId;

  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
  @DateTimeFormat(pattern="yyy-MM-dd HH:mm:ss")
  private LocalDateTime createdDate;

  private String payType;

  private List<GoodInfo> goodInfoList;

}
